package com.example.demo.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

//订单类
@Data
@ApiModel("orders")
public class Order {
    @ApiModelProperty("订单id")
    private String orderId;
    @ApiModelProperty("商品列表，包含商品的id，名称，价格和类型等消息")
    List<Item> items;
    @ApiModelProperty("订单状态：CREATE已创建,PAID已支付,CANCELLED已经取消")
   private OrderStatus status;
@ApiModelProperty("订单总金额")
   double totalPrice;
@ApiModelProperty("订单创建时间")
   LocalDateTime createTime;


    private List<String> remarks;

    public Order() {
        this.remarks = new ArrayList<>();
    }

    public void addRemark(String remark) {
        remarks.add(remark);
    }
}
